package demo1;

/**
 * @Author liangzai
 * @Description:
 */
public class Test {
    //构成整天的下标对数 二
    public long countCompleteDayPairs(int[] hours) {
        long count = 0;
        for (int i = 0; i < hours.length; i++) {
            for (int j = i+1; j < hours.length; j++) {
                if ((hours[i] + hours[j]) % 24 == 0) {
                    count++;
                }
            }
        }
        return count;
    }
}
